package com.zyh.demo;

public class OOPDemo4 {
    public static void main(String[] args) {
        Student student = new Student("zyh", 19, "武汉", 89);
//        student.setName("jyh");
//        student.setAge(20);
//        student.setAddress("湖北");
//        student.setScore(90);
        student.eat();
        student.show();
    }
}

class Student {
    private String name;
    private int age;
    private String address;
    private int score;

    public Student() {
    }

    public Student(String name, int age, String address, int score) {
        this.name = name;
        this.age = age;
        this.address = address;
        this.score = score;
    }

    public void eat() {
        System.out.println("吃饭");
    }

    public void show() {
        System.out.println(name + "---" + age + "---" + address + "---" + score);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
}
